﻿using System;


namespace HAVNet.Intros.AST
{
    public class ASTEmbStmtIf : ASTEmbStmt
    {
        public ASTExpr          testExpression  { get; set; }
        public ASTStatement     thenStatement;
        public ASTStatement     elseStatement;

        public override string ToString ()
        {
            return
                "if (" + testExpression + ") " +
                thenStatement +
                (elseStatement == null ? "" : " else " + elseStatement)
                ; 
        }
    }
}
